package com.sikaryofficial.backend.domain.mapping;

import com.sikaryofficial.backend.domain.entity.Address;
import com.sikaryofficial.system.api.model.AddressDTO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author : qinjinyuan
 * @desc : 地址实体映射
 * @date : 2023/11/03 9:19
 */
@Mapper
public interface AddressMapping {
    AddressMapping INSTANCE = Mappers.getMapper(AddressMapping.class);

    /**
     * 实体映射resp
     *
     * @param address
     * @return
     */
    AddressDTO coverToResp(Address address);

    /**
     * 实体集合映射resp
     *
     * @param attachments
     * @return
     */
    List<AddressDTO> coverListToResp(List<Address> attachments);
}
